package com.my.spring.framework.utils;

public class BeanNameUtil {
    public static String getBeanName(Class<?> beanClass) {
        return firstCaseToLower(beanClass.getSimpleName());
    }

    private static String firstCaseToLower(String name) {
        char[] chars = name.toCharArray();
        if (chars[0] >= 'A' && chars[0] <= 'Z') {
            chars[0] += 32;
        }
        return String.valueOf(chars);
    }
}
